package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.College;
import com.ruoyi.system.domain.Department;
import com.ruoyi.system.service.CollegeService;
import com.ruoyi.system.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("system/deptContrast")
public class deptContrastController extends BaseController {
    @Autowired
    private DepartmentService departmentService;
    @GetMapping("/{name}/{name1}")
    public TableDataInfo getCollege(@PathVariable String name, @PathVariable String name1){
        List<Department> departmentList=new ArrayList<>();
        departmentList.add(departmentService.selectByTwoDept(name));
        departmentList.add(departmentService.selectByTwoDept(name1));
        return getDataTable(departmentList);
    }
}
